/*
*Copyright 2021-2023 NERCIS
*
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
*You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing, software
*distributed under the License is distributed on an "AS IS" BASIS,
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*See the License for the specific language governing permissions and
*limitations under the License.
*/

package cn.ac.nercis.pes.common.constant.knowledge;

/**
 * 指标深度
 * @author zpy
 * @version 1.0.0
 */
public enum TargetDeepness {
    /**体系名**/
    SYSTEM(0,"体系名"),
    /**层面**/
    LAYER(1,"层面"),
    /**测评指标**/
    UNIT(2,"测评指标"),
    /**测评指标描述**/
    TARGET(3,"测评指标描述");

    private final int deepness;
    private final String name;

    TargetDeepness(int deepness, String name) {
        this.deepness = deepness;
        this.name = name;
    }

    public static TargetDeepness fromDeepness(Integer deepness){
        TargetDeepness data = SYSTEM;
        for(TargetDeepness tt :TargetDeepness.values()){
            if(tt.deepness == deepness){
                data = tt;
                break;
            }
        }
        return data;
    }

    public int getDeepness(){
        return this.deepness;
    }

    public String getName(){
        return this.name;
    }
}